<jsp:directive.page contentType="text/html;charset=utf-8" />
<%@ include file="/taglibs.jsp" %>
<head>
	<title>List All Users</title>
	<%@ include file="/WEB-INF/jsps/includes/jqgrid.jsp"%>
</head>

<body>
<table id="list"></table>
<div id="pager"></div>

<script type="text/javascript">
$(document).ready(function(){
	var lastsel; 
	jQuery("#list").jqGrid( {
		url : 'setup!usersJsonList.action',
		datatype : "json",
		prmNames : {
			page : "jq.requestPage", rows : "jq.pageSize", sort : "jq.sortColumn",
			order : "jq.sortDirection", search : "jq._search", nd : "jq.nd", npage : null},
		jsonReader : {
			root : "rows", repeatitems : false, id : "0"},
		colNames : [ 'Role Name', 'Description', 'enabled', 'isDeleted', 'createdDate' ],
		colModel : [ {name : 'userName',index : 'userName', width : 120},
		     		 {name : 'enabled',index : 'enabled asc, invdate',width : 80},
		     		 {name : 'isDeleted',index : 'isDeleted',width : 150},
		     		 {name : 'createdDate',index : 'createdDate desc',width : 200} ],		
		rowNum : 15,
		rowList : [15,30,50],
		height: 'auto',
		pager : '#pager',
		sortname : 'createdDate',
		viewrecords: true,
		sortorder : 'desc',
		loadOnce : true,
		caption : "All Users List"
	});
	<%-- --%>
	jQuery("#usersList").jqGrid('navGrid', '#pager', {edit:true, add:true, del:true});
});
</script>
</body>
